<div id="content">
	<div id="top">
		<h3><%= @checklist.name %></h3>
				<%= render :partial => '/partials/help_link', :locals => {:path => {:controller => "help", :action => "checklists", :anchor => "edit"}} %>
	</div>
	
	<div id="couriers">
		<h2>Couriers Assigned</h2>
		<% @checklist.couriers.sort {|x,y| x.real_name <=> y.real_name}.each do |courier| %>
			<div class="top">
				<h3>
					<%= courier.real_name %>
					<% rule = @checklist.checklist_recurrence_rules.select {|x| x.courier == courier }.first %>
					<%= link_to "unassign", destroy_checklist_recurrence_rule_path(:rule_id => rule.id), :method => :delete %>
				</h3>
			</div>
		<% end %>
		
		<% if @unassigned_couriers.size > 0 %>
			<h2>Assign Another Courier</h2>
			<% form_for @checklist_recurrence_rule do |f| %>
				<%= f.hidden_field :checklist_id %>
				<%= f.collection_select :courier_id, @unassigned_couriers, :id, :real_name %>
				<%= f.hidden_field :days %>
				
				<%= submit_tag "Add" %>
			<% end %>
		<% end %>
	</div>
	
	<div id="checklist_items">
		<h2>Checklist Type</h2>
		<p><%= @checklist.checklist_type.capitalize %>
		<h2>Checklist Items</h2>
		<ol>
		<% @checklist.checklist_items.sort {|x,y| x.item_number <=> y.item_number}.each do |item| %>
			<li><%= item.item_number %>. <%= item.task_text %></li>
		<% end %>
		</ol>
	</div>
</div>